﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/RightFrame.Master"
    CodeBehind="DepartManage.aspx.cs" Inherits="MyOA.UI.PersonManage.DepartManage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ContentPlaceHolderID="cphTitle" ID="cphTitle" runat="server">
    您的位置：部门信息
</asp:Content>
<asp:Content ContentPlaceHolderID="cphContnent" ID="cphContnent" runat="server">

    <script type="text/javascript" language="javascript">
        var Alert = ymPrompt.alert;
        var Error = ymPrompt.errorInfo;
    </script>

     <style>
            .headBackground
            {
            	
             background-image:url("../../images/tab_14.gif");
            }
      </style>
    <br />
   <div class="body_title">部&nbsp;&nbsp;门&nbsp;&nbsp;信&nbsp;&nbsp;息</div>
    <br />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div style="width: 96%; height: 26px; text-align: right; padding-top: 6px">
                <asp:ImageButton ID="imgbtnAddBranchInfo" runat="server" ImageUrl="~/images/write.gif" />
                <asp:Button ID="btnAddUser" runat="server" CssClass="btn" Text="添加部门" Height="20px"
                    onMouseOver="document.getElementById(this.id).className='btnOver'" onMouseOut="document.getElementById(this.id).className='btnOut'"
                    OnClick="btnAddUser_Click" /></div>
           <div style="width:99%; height: 217px;" align="center" id="DIV1">
                <asp:GridView ID="gvDepartInfo" runat="server" AutoGenerateColumns="False" Width="96%"
                    BorderColor="#66CCFF" BorderWidth="1px" CellPadding="8" OnRowCommand="gvDepartInfo_RowCommand"
                    OnRowDataBound="gvDepartInfo_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="DepartId" HeaderText="ID" Visible="false" />
                        <asp:BoundField DataField="DepartName" HeaderText="部门名称" HeaderStyle-CssClass="headBackground"  />
                        <asp:TemplateField HeaderText="所属机构" HeaderStyle-CssClass="headBackground">
                            <ItemTemplate>
                                <asp:Label ID="lblBranchName" runat="server" Text='<%#Eval("Branch.BranchName")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="DepartPhone" HeaderText="部门电话"  HeaderStyle-CssClass="headBackground"/>
                        <asp:BoundField DataField="DepartEmail" HeaderText="部门邮箱" HeaderStyle-CssClass="headBackground" />
                        <asp:TemplateField HeaderText="修改" HeaderStyle-CssClass="headBackground">
                            <ItemTemplate>
                                <asp:ImageButton ID="imgbtnUpdate" ImageUrl="~/images/edit.gif" CommandArgument='<%#Bind("DepartId")%>'
                                    CommandName="departInfoUpdate" Width="16px" Height="15px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="删除" HeaderStyle-CssClass="headBackground">
                            <ItemTemplate>
                                <asp:ImageButton ID="imgbtnDelete" ImageUrl="~/images/delete.gif" CommandArgument='<%#Bind("DepartId")%>'
                                    CommandName="departInfoDelete" Width="15px" Height="11px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <webdiyer:AspNetPager ID="anpDepartInfo" runat="server" OnPageChanged="anpDepartInfo_PageChanged"
                PagingButtonSpacing="10px" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" PageSize="5" ShowNavigationToolTip="True" NavigationToolTipTextFormatString="转到第{0}页"
                        CssClass="paginator"  CurrentPageButtonClass="cpb">
                </webdiyer:AspNetPager>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
